#!/bin/bash
while [ $count = 1 ]
do
( echo open lab-dns.jet.msk.su 25
sleep 8
echo helo lab-dns.jet.msk.su
echo mail from: pmironenko@jet.msk.su
sleep 2
echo rcpt to: pmironenko@jet.msk.su
sleep 2
echo data
sleep 2
echo subject:  test subject
echo
echo
echo this is a test mail
sleep 5
echo .
sleep 5
echo quit ) | telnet
count=2
done
